package cate.game.role.bag.gem;


import cate.common.table.d.GDBag;
import cate.common.table.d.GDObj;
import cate.common.table.item.gem.row.GemBaseRow;
import cate.game.role.Role;
import cate.game.role.bag.BagContainer;
import cate.game.role.bag.gem.msg.GemAddResp;
import easy.java.dev.note.NoteClass;

@NoteClass(value = "宝石")
public class GemBag extends BagContainer<Gem> {
    public GemBag(){

    }

    public GemBag(Role role){
        super(role);
    }

    @Override
    protected byte getItemType() {
        return GDObj.Type.GEM;
    }

    @Override
    public int calcCapacity() {
        return GDBag.Capcity.GEM;
    }

    @Override
    public GemBaseRow getItemTpl(int templateId) {
        return role.getGame().table.gem.base.get(templateId);
    }

    @Override
    protected GemAddResp createItemAddMsg() {
        return new GemAddResp();
    }

    @Override
    protected Gem createItem(int tid, long num) {
        return new Gem(role, tid, num);
    }
}
